#ifndef COMMANDE_H_
#define COMMANDE_H_

#include <map>
#include <string>
#include "CommandLine.h"


class Commande
{
	/*----------- Attributs --------------*/
	
	private:
		static std::map<std::string, Commande*> *mapCommandes;
		static std::map<std::string, Commande*>* getMapCommandes()
		{
			if (!mapCommandes)
				mapCommandes = new std::map<std::string, Commande*>();
			return mapCommandes;
		}
				
	public:
		Commande(std::string tag)
		{
			(*getMapCommandes())[tag] = this;
		}
		virtual ~Commande(){}
		virtual void executer(CommandLine* commandLine) = 0;
		virtual Commande* constructeurVirtuel() = 0;
		static Commande* CreerCommande(std::string tag);
};

#endif /*COMMANDE_H_*/
